Skip to content

Fix preprocess output (do not print stats after the preprocessed source) #2152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 19, 2023

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Apr 18, 2023

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

Do not print compilation stats at the end of the compile --preprocess output.

What is the current behavior?

$ arduino-cli compile -b arduino:avr:uno ~/Arduino/Blink/ --preprocess
#include <Arduino.h>
#line 1 "/home/megabug/Arduino/Blink/Blink.ino"
#line 1 "/home/megabug/Arduino/Blink/Blink.ino"
void setup();
#line 3 "/home/megabug/Arduino/Blink/Blink.ino"
void loop();
#line 1 "/home/megabug/Arduino/Blink/Blink.ino"
void setup() {
}
void loop() {
}


Used platform Version Path                                                        
arduino:avr   1.8.6   /home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6
$

What is the new behavior?

$ arduino-cli compile -b arduino:avr:uno ~/Arduino/Blink/ --preprocess
#include <Arduino.h>
#line 1 "/home/megabug/Arduino/Blink/Blink.ino"
#line 1 "/home/megabug/Arduino/Blink/Blink.ino"
void setup();
#line 3 "/home/megabug/Arduino/Blink/Blink.ino"
void loop();
#line 1 "/home/megabug/Arduino/Blink/Blink.ino"
void setup() {
}
void loop() {
}

$

Does this PR introduce a breaking change, and is titled accordingly?

No

Other information

Fix #2150

@cmaglie cmaglie added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Apr 18, 2023
@cmaglie cmaglie self-assigned this Apr 18, 2023
@cmaglie cmaglie force-pushed the fix_preprocess_output branch from 314f7d6 to 7729241 Compare April 18, 2023 13:38
@codecov
Copy link

codecov bot commented Apr 18, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 🎉

Comparison is base (7b774e1) 62.42% compared to head (d0b5ea6) 62.45%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2152      +/-   ##
==========================================
+ Coverage   62.42%   62.45%   +0.02%     
==========================================
  Files         224      224              
  Lines       19516    19520       +4     
==========================================
+ Hits        12183    12191       +8     
+ Misses       6235     6231       -4     
  Partials     1098     1098              
Flag Coverage Δ
unit 62.45% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
internal/cli/compile/compile.go 67.27% <100.00%> (+0.40%) ⬆️

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cmaglie cmaglie force-pushed the fix_preprocess_output branch from 7729241 to d0b5ea6 Compare April 19, 2023 09:18
@cmaglie cmaglie merged commit 2c2a5cc into arduino:master Apr 19, 2023
@cmaglie cmaglie deleted the fix_preprocess_output branch April 19, 2023 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--preprocess key prints informational messages to the output
2 participants